import Chat from '../common/chat/index';
import { Component } from "react";
import Taro from "@tarojs/taro";
import data from "../util/data";

class PromptChat extends Component {
  componentDidMount() {
    console.log('prompt进来了');
    Taro.setStorageSync('isFake', false);
    Taro.setNavigationBarColor({ backgroundColor: '#2c2c31', frontColor: '#ffffff' })
  }

  onShareAppMessage = () => {
    return {
      title: '免费AI聊天和绘画,用它就够了',
      path: '/pages/prompt-chat/index',
      imageUrl: data.shareImgUrl
    }
  }

  enableShareTimeline = () => {
    return {
      title: data.APP_NAME,
      path: '/pages/prompt-chat/index'
    }
  }

  render() {
    return <Chat isFake={Taro.getStorageSync('isFake')} />;
  }
}

export default PromptChat;
